﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms; 
using DevExpress.XtraEditors ;
using System.Text;

namespace ThuVienTNN
{
    public class showfrm
    {
        /// <summary>
        /// show form cho dev
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="formWindowState"></param>
        /// <param name="formBorderStyle"></param>
        /// <param name="formStartPosition"></param>
        /// <param name="showIntasbar"></param>
        /// <returns></returns>
        public static DialogResult ShowFrm(XtraForm frm,
                                            FormWindowState formWindowState = FormWindowState.Maximized,
                                            FormBorderStyle formBorderStyle = FormBorderStyle.Sizable,
                                            FormStartPosition formStartPosition = FormStartPosition.CenterScreen,
                                               bool showIntasbar = true)
        {
            frm.WindowState = formWindowState;
            frm.FormBorderStyle = formBorderStyle;
            frm.StartPosition = formStartPosition;
            frm.ShowInTaskbar = showIntasbar;
            return frm.ShowDialog();
        }
        /// <summary>
        /// show form cho win
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="formWindowState"></param>
        /// <param name="formBorderStyle"></param>
        /// <param name="formStartPosition"></param>
        /// <param name="showIntasbar"></param>
        /// <returns></returns>
        public static DialogResult ShowFrm(Form  frm,
                                            FormWindowState formWindowState = FormWindowState.Maximized,
                                            FormBorderStyle formBorderStyle = FormBorderStyle.Sizable,
                                            FormStartPosition formStartPosition = FormStartPosition.CenterScreen,
                                               bool showIntasbar = true)
        {
            frm.WindowState = formWindowState;
            frm.FormBorderStyle = formBorderStyle;
            frm.StartPosition = formStartPosition;
            frm.ShowInTaskbar = showIntasbar;
            return frm.ShowDialog();
        }
    }
}
